package com.game;



import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.TextView;

public class homeActivity extends Activity implements OnClickListener{
	
	public Context pxt = this;
	protected static TextView tv;
	protected static int score = 0;

	public void onCreate(Bundle savedInstanceState){
		 super.onCreate(savedInstanceState);
	     setContentView(R.layout.main);
	      FrameLayout lo = (FrameLayout)findViewById(R.id.awesome);
	        lo.addView(new DataView(this));
	        tv = (TextView)findViewById(R.id.txt);
	        tv.setText("Score: " + score);
	        
	     Button home = (Button)findViewById(R.id.swtch);
	     home.setOnClickListener(this);
	     
	     pxt = this;
	     Bundle bundle = getIntent().getExtras();
	     String string = bundle.getString("name");
	     
	}
	
    public static void updateScore(){
        tv.setText("Score: -" + score);
    }

	
	public void onClick(View v) {
		Intent intent = new Intent(pxt, GameActivity.class);
		pxt.startActivity(intent);
		
	}

}
